package com.ht.searchrooky.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.ht.searchrooky.domain.User;

@Controller
public class UserController {

	@RequestMapping(value="login")
	public ModelAndView login(User user){
		System.out.println("userName.."+user);
		ModelAndView modelAndView = new ModelAndView("login");
		modelAndView.addObject("error", "user name is not exists");
		return modelAndView;
	}
	
	@RequestMapping(value={"/","/home"})
	public String main(){
		return "login";
	}
	
}
